﻿<Window x:Class="NetworkPower.UI.ExportList"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:NetworkPower.UI"
        Title="导出列表" Height="600" Width="800" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <!--<local:TerminalNoColorConverter x:Key="tnColorCvrt"/>
        <local:LoopLineNameColorConverter x:Key="lnColorCvrt"/>-->
    </Window.Resources>
    <Grid>
        <ComboBox HorizontalAlignment="Left" Margin="38,61,0,0" VerticalAlignment="Top" Width="120" Name="cmbLineProtectBox" SelectionChanged="cmbLineProtectBox_SelectionChanged">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Rectangle Fill="{Binding Key}" Width="16" Height="16" Margin="0,2,5,2" />
                        <TextBlock Text="{Binding Value}" />
                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>

        <ComboBox HorizontalAlignment="Left" Margin="38,103,0,0" VerticalAlignment="Top" Width="120" Name="cmdDepartment"  Visibility="Hidden" SelectionChanged="cmdDepartment_SelectionChanged">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Rectangle Fill="{Binding Key}" Width="16" Height="16" Margin="0,2,5,2" />
                        <TextBlock Text="{Binding Value}" />
                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <DataGrid x:Name="dataGridView1" Margin="193,30,25,23" AutoGenerateColumns="False" CanUserAddRows="false" ItemsSource="{Binding Path=LoopLine}"  IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=LoopLineName.Text}" Header="说明">
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="DataGridCell">
                            <!--<Setter Property="Background">
                                <Setter.Value>
                                    <Binding Converter="{StaticResource lnColorCvrt}"/>
                                </Setter.Value>
                            </Setter>-->
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Path=InternalLine}" Header="内部配线">
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="DataGridCell">
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Path=TerminalNo.Text}" Header="端子号">
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="DataGridCell">
                            <!--<Setter Property="Background">
                                <Setter.Value>
                                    <Binding Converter="{StaticResource tnColorCvrt}"/>
                                </Setter.Value>
                            </Setter>-->
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Path=OuterLine}" Header="外部配线">
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="DataGridCell">
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Path=LoopNo}" Header="回路编号">
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="DataGridCell">
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Path=null}" Header="分组">
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="DataGridCell">
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>

    </Grid>
</Window>
